import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

//登录
import LoginPhone from '@/page/login/login-phone.vue'
import LoginWx from '@/page/login/login-wx.vue'
//首页
import HomePage from '@/page/homepage/index.vue'
//素材管理相关
import FrameIndex from '@/page/frame/index.vue'
import FrameNew from '@/page/frame/new.vue'
import FrameDetail from '@/page/frame/detail.vue'

import MatcardIndex from '@/page/matcard/index.vue'
import MatcardNew from  '@/page/matcard/new.vue'
import MatcardDetail from '@/page/matcard/detail.vue'

import BackGroundIndex from '@/page/background/index.vue'
import BackGroundNew from '@/page/background/new.vue'
import BackGroundDetail from '@/page/background/detail.vue'

import SenceIndex from '@/page/sence/index.vue'
import SenceNew from '@/page/sence/new.vue'
import SenceDetail from '@/page/sence/detail.vue'
// 用户管理
import UserView from '@/page/user/index.vue'
import Udetail from '@/page/user/u-detail.vue'

// 商户管理
import ShopView from '@/page/shop/index.vue'
import ShopDetail from '@/page/shop/detail.vue'

// 厂家管理
import FactoryManage from '@/page/factory-manage/index.vue'
import FactoryDetail from '@/page/factory-manage/f-detail.vue'
import NewFactory from '@/page/factory-manage/new-factory.vue'

//用户管理相关

//商户管理相关

//平台管理员

import PlateManage from '@/page/plate/index.vue'
import PlateManageDetail from '@/page/plate/detail.vue'
import AddManager from '@/page/plate/add.vue'
import WxScanner from '@/page/plate/scan.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'loginphone',
      component: LoginPhone
    },{
      path: '/login/loginwx',
      name: 'loginwx',
      component: LoginWx
    },{
      path: '/homepage',
      name: 'homepage',
      component: HomePage
    },{
      path: '/frame/index',
      name: 'frame_index',
      component: FrameIndex,
      meta:{keepAlive:true}
    },{
      path: '/frame/new',
      name: 'frame_new',
      component: FrameNew
    },{
      path: '/frame/detail',
      name: 'frame_detail',
      component: FrameDetail
    },{
      path: '/matcard/index',
      name: 'matcard_index',
      component: MatcardIndex,
      meta:{keepAlive:true}
    },{
      path: '/matcard/new',
      name: 'matcard_new',
      component: MatcardNew
    },
    {
      path: '/matcard/detail',
      name: 'matcard_detail',
      component: MatcardDetail
    },
    {
      path: '/background/index',
      name: 'background_index',
      component: BackGroundIndex,
      meta:{keepAlive:true}
    },
    {
      path: '/background/new',
      name: 'background_new',
      component: BackGroundNew
    },
    {
      path: '/background/detail',
      name: 'background_detail',
      component: BackGroundDetail
    },
    {
      path: '/sence/index',
      name: 'sence_index',
      component: SenceIndex,
      meta:{keepAlive:true}
    },
    {
      path: '/sence/new',
      name: 'sence_new',
      component: SenceNew
    },
    {
      path: '/sence/detail',
      name: 'sence_detail',
      component: SenceDetail
    },
    {
      path: '/user',
      name: 'user',
      component: UserView
    },
    {
      path: '/user/detail',
      name: 'Udetail',
      component: Udetail
    },
    {
      path: '/shop',
      name: 'shop',
      component: ShopView
    },
    {
      path: '/shop/detail',
      name: 'ShopDetail',
      component: ShopDetail
    },
    {
      path: '/factory/manage',
      name: 'FactoryManage',
      component: FactoryManage
    },
    {
      path: '/factory/detail',
      name: 'FactoryDetail',
      component: FactoryDetail
    },
    {
      path: '/new/factory',
      name: 'NewFactory',
      component: NewFactory
    },
    {
      path: '/plate',
      name: 'PlateManage',
      component: PlateManage
    },
    {
      path: '/plate/detail',
      name: 'PlateManageDetail',
      component: PlateManageDetail
    },
    {
      path: '/plate/add',
      name: 'AddManager',
      component: AddManager
    },
    {
      path: '/plate/scan',
      name: 'WxScanner',
      component: WxScanner
    }
  ]
})
